
//初始化
function init() {
		var page = parseInt(document.form.currentPage.value);
		var pageCount = parseInt(document.form.pageCount.value);
		var count=parseInt(document.form.count.value);
		if (page == 1 && pageCount!=1) {
			document.form.pre1.disabled = "disabled";
			return;
		}
		if (page == pageCount && pageCount!=1) {
			document.form.next1.disabled = "disabled";
			return;
		}
		if (pageCount == 1) {
			document.form.pre1.disabled = "disabled";
			document.form.next1.disabled = "disabled";
			document.form.first1.disabled = "disabled";
			document.form.end1.disabled = "disabled";
			return;
		}
	} 

	function first() {
		window.location.href = http_request+"/upload/getAtlas.do?currentPage=1"+getQueryData();
		
	}

	function next() {
		var page = parseInt(document.form.currentPage.value);
		window.location.href = http_request+"/upload/getAtlas.do?currentPage="
				+ (page + 1)+getQueryData();
	}

	function pre() {
		var page = parseInt(document.form.currentPage.value);
		window.location.href = http_request+"/upload/getAtlas.do?currentPage="
				+ (page - 1)+getQueryData();
	}

	function end() {
		var pageCount = parseInt(document.form.pageCount.value);
		window.location.href = http_request+"/upload/getAtlas.do?currentPage="
				+ pageCount+getQueryData();
	}
	
	//全选多选操作
	function allselect(){
		//全选
		  $("#allbox_for_requ").click(function(){
		    	if(this.checked){
		    	$("input[name='requ_select']").prop("checked",true);
		    	}else{
		    		$("input[name='requ_select']").prop("checked",false);
		    	}
		    });
		    
		    $("input[name='requ_select']").click(function(){
		    	var chkAllNum=$("input[name='requ_select']").size(); //选项总个数
		    	var chkSelectNum=0;
		    	$("input[name='requ_select']").each(function(i){
		    		if($(this).prop("checked")==true){
		    			chkSelectNum++;
		    		}
		    	});
		    	if(chkAllNum==chkSelectNum){
		    		//全选
		    		$("#allbox_for_requ").prop("checked",true);
		    	}else{
		    		//非全选
		    		$("#allbox_for_requ").prop("checked",false);
		    	}
		    });
		
		
	}
	
	
	//清除筛选条件
	function clearData(){
		$("#atlasName").val("");
		$("#atlasTags").val("");
		$("#isDelete").val("");}
	
	//拼接查询条件
	function getQueryData(){
		var atlasName=$("#atlasName").val();
		var atlasTags=$("#atlasTags").val();
		var isDelete=$("#isDelete").val();
		var queryper="&atlasName="+atlasName+"&atlasTags="+atlasTags+"&isDelete="+isDelete; 
		return queryper;
		}
